#app {
  // //菜单选中时 左边添加小圆点
  // .el-menu-item.is-active::before {
  //   content: "";
  //   display: block;
  //   position: absolute;
  //   left: 24px;
  //   top: 50%;
  //   width: 6px;
  //   height: 6px;
  //   background: #fff;
  //   border-radius: 50%;
  //   transform: translateY(-50%);
  // }
  // .submenu-title-noDropdown::before {
  //   display: none !important;
  // }
  // //调整三级菜单左边的小圆点定位
  // .nest-menu {
  //   .nest-menu {
  //     .is-active::before {
  //       left: 44px;
  //     }
  //   }
  // }

  // main-container
  .main-container {
    transition: margin-left 0.28s;
    margin-left: $menuWrapWidth;
    position: relative;
    background: #f1f3f7;
  }
  //app-main
  .app-main {
    height: $appMainHeight;
  }
  // topHeadGroup
  .topHead-wrap,
  .adminGroup-wrap {
    height: $topHeadHeight;
  }
  //navbar
  .navbar {
    height: $navBarHeight;
    .app-breadcrumb.el-breadcrumb,
    .hamburger-container {
      line-height: $navBarHeight;
    }
    .el-breadcrumb__inner a {
      color: $defaultTextColor1;
    }
    .no-redirect {
      color: $defaultTextColor2;
    }
    .hamburger {
      fill: $defaultTextColor1;
    }
  }
  // tags-view
  .tags-view-container {
    height: $tagsViewHeight;
    .tags-view-item {
      color: $defaultTextColor2;
      &.active {
        color: $--color-primary;
      }
    }
  }
  // system-name
  .system-name {
    line-height: $topHeadHeight;
  }
  .submenu-title-noDropdown {
    background-color: $menuWrapBg !important;
  }
  //这里处理子菜单文本过长
  .el-menu-item {
    background-color: $subMenuBg !important;
    span {
      max-width: 180px;
      min-width: 150px;
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      &:hover {
        overflow: visible;
      }
    }
    &:hover {
      span {
        white-space: normal;
        word-break: break-all;
        line-height: 16px;
        flex: 1;
      }
    }
  }
  .submenu-title-noDropdown {
    background-color: $menuWrapBg !important;
  }
  //这里处理一级菜单文本过长
  .el-submenu__title {
    span {
      display: inline-block;
      max-width: 140px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      &:hover {
        overflow: visible;
      }
    }
  }
  //选中状态时 菜单背景色，文本色
  .el-menu-item.is-active {
    position: relative;
    background: $subMenuActiveBg !important;
  }
  .is-active {
    > .el-submenu__title {
      color: $menuActiveParentTextColor !important;
      transition: none;
      background: $menuActiveParentBg !important;
    }
  }
  .sidebar-container {
    transition: width 0.28s;
    width: $menuWrapWidth;
    background-color: $menuWrapBg;
    position: fixed;
    bottom: 0;
    top: $topHeadHeight;
    left: 0;
    z-index: 1001;
    overflow: hidden;
    .horizontal-collapse-transition {
      transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
    }
    .scrollbar-wrapper {
      overflow-x: hidden !important;
    }
    .el-scrollbar__bar.is-vertical {
      right: 0px;
    }
    .el-scrollbar {
      height: 100%;
    }
    .is-horizontal {
      display: none;
    }
    a {
      display: block;
      width: 100%;
      overflow: hidden;
    }
    .svg-icon {
      margin-right: 16px;
      font-size: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
    .el-menu {
      border: none;
      height: 100%;
      width: 100% !important;
    }
    .submenu-title-noDropdown,
    .el-submenu__title {
      &:hover {
        background: $parentMenuHoverBg;
      }
    }
    & .nest-menu .el-submenu > .el-submenu__title,
    & .el-submenu .el-menu-item {
      min-width: $menuWrapWidth !important;
      background-color: $subMenuBg;

      &:hover {
        background: $subMenuHoverBg !important;
      }
    }
  }

  .hideSidebar {
    .sidebar-container {
      width: 54px !important;
    }

    .main-container {
      margin-left: 54px;
    }

    .submenu-title-noDropdown {
      padding: 0 !important;
      position: relative;

      .el-tooltip {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }
      }
    }

    .el-submenu {
      overflow: hidden;

      & > .el-submenu__title {
        padding: 0 !important;

        .svg-icon {
          margin-left: 20px;
        }

        .sub-el-icon {
          margin-left: 19px;
        }

        .el-submenu__icon-arrow {
          display: none;
        }
      }
    }

    .el-menu--collapse {
      .el-submenu {
        & > .el-submenu__title {
          & > span {
            height: 0;
            width: 0;
            overflow: hidden;
            visibility: hidden;
            display: inline-block;
          }
        }
      }
    }
  }
  .el-menu--collapse .el-menu .el-submenu {
    min-width: $menuWrapWidth !important;
  }
  // 适配移动端, Mobile responsive
  .mobile {
    .main-container {
      margin-left: 0px;
    }

    .sidebar-container {
      transition: transform 0.28s;
      width: $menuWrapWidth !important;
    }

    &.hideSidebar {
      .sidebar-container {
        pointer-events: none;
        transition-duration: 0.3s;
        transform: translate3d(-$menuWrapWidth, 0, 0);
      }
    }
  }

  .withoutAnimation {
    .main-container,
    .sidebar-container {
      transition: none;
    }
  }
}

// when menu collapsed
.el-menu--vertical {
  & > .el-menu {
    .svg-icon {
      margin-right: 16px;
    }
    .sub-el-icon {
      margin-right: 12px;
      margin-left: -2px;
    }
  }

  .nest-menu .el-submenu > .el-submenu__title,
  .el-menu-item {
    &:hover {
      background: $subMenuHoverBg !important;
    }
  }

  // the scroll bar appears when the subMenu is too long
  > .el-menu--popup {
    max-height: 100vh;
    overflow-y: auto;

    &::-webkit-scrollbar-track-piece {
      background: #d3dce6;
    }

    &::-webkit-scrollbar {
      width: 6px;
    }

    &::-webkit-scrollbar-thumb {
      background: #99a9bf;
      border-radius: 20px;
    }
  }
}
